package hnxmrouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/handlers/pcl/hnxmsc/xmwxapplet"
	"yundian/internel/app/handlers/pcl/shweixin"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitShWeixinRouter() dingo.ApiRouter {
	return func(g *gin.RouterGroup) {
		{

			r := g.Group("wx")
			r.Use(middlewares.JwtAppletAuthMiddleware)                    // 加载中间件 - 授权需要登录
			r.POST("device/draw-coupon", shweixin.HandleDrawDeviceCoupon) // 设备优惠 抵用券

			r.POST("notifications", shweixin.HandleNotifications)                                     // 服务通知
			r.POST("get-places-service-materials-list", shweixin.HandleGetPlacesServiceMaterialsList) // 门店物品查询

			r.GET("service-order-list", shweixin.HandleServiceOrderList)                 // 查询工单列表
			r.POST("service-order-details", shweixin.HandleServiceOrderDetails)          // 查询工单详情
			r.POST("service-room-order-details", shweixin.HandleServiceRoomOrderDetails) // 查询工单详情-续住
			r.PUT("service-order-update", shweixin.HandleServiceOrderUpdate)             // 工单列表修改

			r.GET("goods-list", shweixin.HandleGoodsList)            // 商品列表
			r.POST("get-goods-details", shweixin.HandleGoodsDetails) // 商品详情

			r.POST("comment-details", shweixin.HandleCommentDetails)                                  // 查询好评详情
			r.POST("comment-submit", shweixin.HandleCommentSubmit)                                    // 提交好评信息
			r.POST("comment-red-packet-receive", shweixin.HandleCommentRedPacketReceive)              // 好评红包领取
			r.POST("comment-red-packet-receive-inform", shweixin.HandleCommentRedPacketReceiveInform) // 好评红包领取通知
			r.POST("set-comment-goods", shweixin.HandleSetCommentGoods)                               // 确定盲盒抽奖商品

			r.POST("address-list", shweixin.HandleGetUserAddress)           // 获取用户地址列表
			r.POST("address-create", shweixin.HandleCreateUserAddress)      // 保存用户地址
			r.POST("address-details", shweixin.HandleGetUserAddressDetails) // 查询地址详情
			r.POST("address-update", shweixin.HandleUpdateUserAddress)      // 修改地址
			r.POST("address-delete", shweixin.HandleRemoveUserAddress)      // 删除地址

			r.POST("league-submit", shweixin.HandleLeagueSubmit)               // 加盟信息提交
			r.POST("complaint-advice", xmwxapplet.HandleInsertComplaintAdvice) // 投诉建议

			r.POST("place-bulletin", shweixin.HandleGetPlaceBulletin)
		}
	}
}
